package com.wonking.springbootv2.thread;

import cn.hutool.core.util.ArrayUtil;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Collectors;

public class Test {

    public static Integer calc(Integer params){
        try {
            Thread.sleep(1000);
        }catch(Exception e){

        }
            return params*params;
    }

    public static void main(String[] args){
        List<Integer> tList=new ArrayList<>();
        tList.add(1);
        tList.add(2);
        List<Integer> newList= tList.stream().map(t->t+1).filter(t->t%2==1).collect(Collectors.toList());
        System.out.println(newList);
    }
}
